import Axios from '@/utils/request';

/**
 * operateType--操作类型; 自动刷新：autoRefresh，用户操作：userAction，为空请求时设置为userAction，用于设置系统日志类型
 */

/**
 * 获取产品分布
 */
export function getFundDistribution(operateType?: string): Promise<any> {
    // return Axios.get('/cockpit/fundDistribution');
    return Axios({ url: '/cockpit/fundDistribution', method: 'get', headers: { operateType: operateType } });
}

/**
 * 指令分布--产品类型
 */
export function getInstDistributionFundType(operateType?: string): Promise<any> {
    // return Axios.get('/cockpit/instructionDistributionFundType');
    return Axios({ url: '/cockpit/instructionDistributionFundType', method: 'get', headers: { operateType: operateType } });
}

/**
 * 指令分布--指令类型
 */
export function getInstDistributionType(operateType?: string): Promise<any> {
    // return Axios.get('/cockpit/instructionDistributionType');
    return Axios({ url: '/cockpit/instructionDistributionType', method: 'get', headers: { operateType: operateType } });
}

/**
 * 触警分布
 */
export function getThresholdDistribution(operateType?: string): Promise<any> {
    // return Axios.get('/cockpit/thresholdDistribution');
    return Axios({ url: '/cockpit/thresholdDistribution', method: 'get', headers: { operateType: operateType } });
}

/**
 * 静态计算分布
 */
export function getStaticDistribution(operateType?: string): Promise<any> {
    // return Axios.get('/cockpit/staticDistribution');
    return Axios({ url: '/cockpit/staticDistribution', method: 'get', headers: { operateType: operateType } });
}

/**
 * 旁路动态信息
 */
export function getBypass(operateType?: string): Promise<any> {
    // return Axios.get('/cockpit/bypass/new');
    return Axios({ url: '/cockpit/bypass/new', method: 'get', headers: { operateType: operateType } });
}

/**
 * 连续违规
 */
export function getContinuousBreakRule(operateType?: string): Promise<any> {
    // return Axios.get('/cockpit/continuousBreakRule');
    return Axios({ url: '/cockpit/continuousBreakRule', method: 'get', headers: { operateType: operateType } });
}

/**
 * 连续触警
 */
export function getContinuousTriggerWarning(operateType?: string): Promise<any> {
    // return Axios.get('/cockpit/continuousTriggerWarning');
    return Axios({ url: '/cockpit/continuousTriggerWarning', method: 'get', headers: { operateType: operateType } });
}

/**
 * 实时触警走势
 */
export function getRealTimeThreshold(operateType?: string): Promise<any> {
    // return Axios.get('/cockpit/realTimeThreshold');
    return Axios({ url: '/cockpit/realTimeThreshold', method: 'get', headers: { operateType: operateType } });
}

/**
 * 静态触警分组
 */
export function getStaticGradeGroup(operateType?: string): Promise<any> {
    // return Axios.get('/cockpit/staticGradeGroup');
    return Axios({ url: '/cockpit/staticGradeGroup', method: 'get', headers: { operateType: operateType } });
}

/**
 * 实时监控
 */
export function getRealTimeMonitor(operateType?: string): Promise<any> {
    // return Axios.get('/cockpit/realTimeMonitor');
    return Axios({ url: '/cockpit/realTimeMonitor', method: 'get', headers: { operateType: operateType } });
}
